import React from "react";
import { Input, Button, List } from "antd";
 const Container = (props) => {
  return (
    <div>
      <Input
        onChange={props.handleChange}
        value={props.inputValue}
        placeholder="todolist"
        style={{ width: "300px", marginRight: "10px" }}
      />
      <Button type="primary" onClick={props.pushaddAction}>
        提交
      </Button>
      <List
        style={{ width: "300px", marginTop: "10px" }}
        header={<div>Header</div>}
        footer={<div>Footer</div>}
        bordered
        dataSource={props.list}
        renderItem={(item, index) => (
          <List.Item
            onClick={() => {
              props.handledelete(index);
            }}
          >
            {item}
          </List.Item>
        )}
      />
    </div>
  );
};
export default Container